import requests
import json
url = 'https://fanyi.baidu.com/sug'
a = input('请输入一个单词')
head = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36'}
data = {'kw': 'a'}
r = requests.post(url=url, data=data, headers=head)
r.encoding = r.apparent_encoding
neir = r.text
print(json.loads(neir))